/**
 * Created by lujing on 2016/7/8.
 */
$(function () {
	
  document.documentElement.style.fontSize = window.innerWidth / 3.75 + 'px';
  
  function GetQueryString(name)
  {
    var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
    var r = window.location.search.substr(1).match(reg);
    if(r!=null)return  unescape(r[2]);
    return null;
  }
  var identifyId = getQueryStr("identifyId");
  if(identifyId != "999"){
	  $(".close-icon").remove();
    }
  var back_id = GetQueryString("carId");
  if(back_id == "1" || back_id == "2"){
    $(".back-img").find("img").attr("src","img/dongfeng_banner.jpg");
  }
  if(back_id == "3" || back_id == "4"){
    $(".back-img").find("img").attr("src","img/yage_banner.jpg");
  }
  $(".back-btn").find("button").on("click", function() {
	if (back_id == "1" || back_id == "2") {
		window.location.href = "base_index.html?bizId=5&userId=" + GetQueryString("userId") +"&identifyId="+identifyId +"&cityNo="+getQueryStr("cityNo");
	}
	if (back_id == "3" || back_id == "4") {
		window.location.href = "base_index.html?bizId=6&userId=" + GetQueryString("userId") +"&identifyId="+identifyId +"&cityNo="+getQueryStr("cityNo");
	}
  });
  if(identifyId != "999"){
      $(".close-icon").remove();
  }
  $(".close-icon").on("click",function(){
      window.history.back();
    })
})